package god;

import java.util.Scanner;

public class J01MyAge {
	public static int getAge(int a, int b) {
		int result;
		result = a - b + 1;
		return result;
	}
	public static void main(String[] args) {
		int birthYear, nowYear, age;
		
		Scanner sc = new Scanner(System.in);
		System.out.println("태어난 연도를 입력해 주세요");
		birthYear = sc.nextInt();
		System.out.println("현재 연도를 입력해주세요");
		nowYear = sc.nextInt();
		
		age = getAge (nowYear, birthYear);
		
		System.out.println("당신의 현재 나이는 " + age + "입니다");
		
		sc.close();
	}

}
